﻿using System;
using System.Diagnostics;

namespace Program12_Process
{
    class Program
    {
        //获取当前程序中所有正在运行的进程
        static void Main(string[] args)
        {
            //Process[] pros = Process.GetProcesses();
            //foreach(var p in pros)
            //{
            //    Console.WriteLine(p);
            //    //关闭进程
            //   // p.Kill();
            //}
            //Console.ReadKey(true);
            //Process.Start("notepad");

            //通过进程打开指定的exe
            Console.ReadKey();

            ProcessStartInfo psi = new ProcessStartInfo(@"C:\Users\pc\Desktop\MikuMikuDance 10th Anniversary Version CHS\MikuMikudance.exe");

            //创建进程
            Process p = new Process();
            p.StartInfo = psi;
            p.Start();

        }
    }
}
